
class Animal
{
    String name;
}

class Kozel : Animal
{
}

class Baran : Animal
{
}

class Farmer
{
    List<Animal> produce()
    {
        s = new List();
        
        s.add(new Kozel());
        s.add(new Baran());
    }
}


class FoodProcessor
{
    void process(List<Animal>)
    {
        for (Animal a : animals)
        {
            if (a.name == "Kozel")
            {
                Kozel k = (Kozel)a;
                preprocess(k);
            }           
            process(a);
        }
    }
}
